Current Location: Home> Function Categories> min

min

Find the minimum value
Name:min
Category:math
Programming Language:php
One-line Description:Returns the minimum value.

Definition and usage

min() returns the minimum value.

Example

In this example, we will use min() to return the minimum value of the two specified numbers:

 <?php
echo ( min ( 5 , 7 ) ) ;
echo ( min ( - 3 , 5 ) ) ;
echo ( min ( - 3 , - 5 ) ) ;
echo ( min ( 7.25 , 7.30 ) ) ;
?>

Try it yourself

grammar

 min ( x , y )
parameter describe
x Required. A number.
y Required. A number.

illustrate

min() returns the smallest value in the parameter.

If there is only one parameter and is an array, min() returns the smallest value in the array. If the first parameter is an integer, string, or floating point number, at least two parameters are required and min() returns the smallest of these values. An infinite number of values ​​can be compared.

Similar Functions
  • Returns exp(number) - 1, and can calculate the exact result even when the value of number is close to zero. expm1

    expm1

    Returnsexp(number)-1
  • Further method to sort ceil

    ceil

    Furthermethodtosort
  • Natural logarithm log

    log

    Naturallogarithm
  • Convert decimal to octal decoct

    decoct

    Convertdecimaltoocta
  • Determine whether it is infinite is_infinite

    is_infinite

    Determinewhetheritis
  • Antihyperbolic cosine acosh

    acosh

    Antihyperboliccosine
  • Convert octal to decimal octdec

    octdec

    Convertoctaltodecima
  • Calculate the oblique length of a straight triangle hypot

    hypot

    Calculatetheobliquel
Popular Articles